"""
The MIT License (MIT)
Copyright © 2018 Jean-Christophe Bos & HC² (www.hc2.fr)
"""

class MicroWebSrvRoute :
    def __init__(self, route, method, func, routeArgNames, routeRegex) :
        """
        Initialize object
		"""
		...


class MicroWebSrv :
    _indexPages = ...

    _mimeTypes = ...

    _html_escape_chars = ...

    _pyhtmlPagesExt = ...

    _docoratedRouteHandlers = ...

    @classmethod
    def route(cls, url, method='GET'):
        """
        Adds a route handler function to the routing list
        """
        ...

    @staticmethod
    def HTMLEscape(s) :
        """
        HTMLEscape
        """
        ...

    @staticmethod
    def _startThread(func, args=()) :
        """
        _startThread
        """
        ...

    @staticmethod
    def _unquote(s) :
        """
        _unquote
        """
        ...

    @staticmethod
    def _unquote_plus(s) :
        """
        _unquote_plus
        """
        ...

    @staticmethod
    def _fileExists(path) :
        """
        _fileExists
        """
        ...

    @staticmethod
    def _isPyHTMLFile(filename) :
        """
        _isPyHTMLFile
        """
        ...

    def __init__( self, routeHandlers = [], port = 80, bindIP = '0.0.0.0', webPath = "/flash/www" ) :
        """
        init object
        """
        ...

    def _serverProcess(self) :
        """
        _serverProcess
        """
        ...

    def Start(self, threaded=False) :
        """
        Start
        """
        ...

    def Stop(self) :
        """
        Stop
        """
        ...

    def IsStarted(self) :
        """
        IsStarted
        """
        ...

    def SetNotFoundPageUrl(self, url=None) :
        """
        SetNotFoundPageUrl
        """
        ...

    def GetMimeTypeFromFilename(self, filename) :
        """
        GetMimeTypeFromFilename
        """
        ...
    
    def GetRouteHandler(self, resUrl, method) :
        """
        GetRouteHandler
        """
        ...

    def _physPathFromURLPath(self, urlPath) :
        """
        _physPathFromURLPath
        """
        ...

    class _client :
        def __init__(self, microWebSrv, socket, addr) :
            """
            init object
            """
            ...

        def _processRequest(self) :
            """
            _processRequest
            """
            ...

        def _parseFirstLine(self, response) :
            """
            _parseFirstLine
            """
            ...

        def _parseHeader(self, response) :
            """
            _parseHeader
            """
            ...

        def _getConnUpgrade(self) :
            """
            _getConnUpgrade
            """
            ...

        def GetServer(self) :
            """
            GetServer
            """
            ...

        def GetAddr(self) :
            """
            GetAddr
            """
            ...

        def GetIPAddr(self) :
            """
            GetIPAddr
            """
            ...

        def GetPort(self) :
            """
            GetPort
            """
            ...

        def GetRequestMethod(self) :
            """
            GetRequestMethod
            """
            ...

        def GetRequestTotalPath(self) :
            """
            GetRequestTotalPath
            """
            ...

        def GetRequestPath(self) :
            """
            GetRequestPath
            """
            ...

        def GetRequestQueryString(self) :
            """
            GetRequestQueryString
            """
            ...

        def GetRequestQueryParams(self) :
            """
            GetRequestQueryParams
            """
            ...

        def GetRequestHeaders(self) :
            """
            GetRequestHeaders
            """
            ...

        def GetRequestContentType(self) :
            """
            GetRequestContentType
            """
            ...

        def GetRequestContentLength(self) :
            """
            GetRequestContentLength
            """
            ...

        def ReadRequestContent(self, size=None) :
            """
            ReadRequestContent
            """
            ...

        def ReadRequestPostedFormData(self) :
            """
            ReadRequestPostedFormData
            """
            ...

        def ReadRequestContentAsJSON(self) :
            """
            ReadRequestContentAsJSON
            """
            ...

    class _response :
        def __init__(self, client) :
            """
            init object
            """
            ...

        def _write(self, data, strEncoding='ISO-8859-1') :
            """
            _write
            """
            ...

        def _writeFirstLine(self, code) :
            """
            _writeFirstLine
            """
            ...

        def _writeHeader(self, name, value) :
            """
            _writeHeader
            """
            ...

        def _writeContentTypeHeader(self, contentType, charset=None) :
            """
            _writeContentTypeHeader
            """
            ...

        def _writeServerHeader(self) :
            """
            _writeServerHeader
            """
            ...

        def _writeEndHeader(self) :
            """
            _writeEndHeader
            """
            ...

        def _writeBeforeContent(self, code, headers, contentType, contentCharset, contentLength) :
            """
            _writeBeforeContent
            """
            ...

        def WriteSwitchProto(self, upgrade, headers=None) :
            """
            WriteSwitchProto
            """
            ...

        def WriteResponse(self, code, headers, contentType, contentCharset, content) :
            """
            WriteResponse
            """
            ...

        def WriteResponsePyHTMLFile(self, filepath, headers=None, vars=None) :
            """
            WriteResponsePyHTMLFile
            """
            ...

        def WriteResponseFile(self, filepath, contentType=None, headers=None) :
            """
            WriteResponseFile
            """
            ...

        def WriteResponseFileAttachment(self, filepath, attachmentName, headers=None) :
            """
            WriteResponseFileAttachment
            """
            ...

        def WriteResponseOk(self, headers=None, contentType=None, contentCharset=None, content=None) :
            """
            WriteResponseOk
            """
            ...

        def WriteResponseJSONOk(self, obj=None, headers=None) :
            """
            WriteResponseJSONOk
            """
            ...

        def WriteResponseRedirect(self, location) :
            """
            WriteResponseRedirect
            """
            ...

        def WriteResponseError(self, code) :
            """
            WriteResponseError
            """
            ...

        def WriteResponseJSONError(self, code, obj=None) :
            """
            WriteResponseJSONError
            """
            ...

        def WriteResponseNotModified(self) :
            """
            WriteResponseNotModified
            """
            ...

        def WriteResponseBadRequest(self) :
            """
            WriteResponseBadRequest
            """
            ...

        def WriteResponseForbidden(self) :
            """
            WriteResponseForbidden
            """
            ...

        def WriteResponseNotFound(self) :
            """
            WriteResponseNotFound
            """
            ...

        def WriteResponseMethodNotAllowed(self) :
            """
            WriteResponseMethodNotAllowed
            """
            ...

        def WriteResponseInternalServerError(self) :
            """
            WriteResponseInternalServerError
            """
            ...

        def WriteResponseNotImplemented(self) :
            """
            WriteResponseNotImplemented
            """
            ...

        def FlashMessage(self, messageText, messageStyle='') :
            """
            FlashMessage
            """
            ...

        _errCtnTmpl = ...

        _execErrCtnTmpl = ...

        _responseCodes = ...
